-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reactive Systems #284
base: master
Are you sure you want to change the base?
Reactive Systems #284
Conversation
Things that are left to do:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #284 +/- ##
==========================================
- Coverage 77.93% 77.36% -0.58%
==========================================
Files 316 321 +5
Lines 23585 23796 +211
==========================================
+ Hits 18382 18410 +28
- Misses 5203 5386 +183 ☔ View full report in Codecov by Sentry. |
Made some headway with the reactive aqueous systems. And got it to work to pure water to get pH: species = ["water","hydronium","hydroxide"]
reactions = [("water"=>-2,"hydronium"=>1,"hydroxide"=>1)]
eosmodel = SAFTVREMie(["water"],["hydronium","hydroxide"])
model = ReactiveAqModel(species,reactions; model = eosmodel)
Clapeyron.pH(model,1e5, 298.15, [1.0, 0.0, 0.0]; z0=[1e-9]) # 7.0978252141976785 The difficult part here is the reference systems... In the case of electrolytes, since the ions can't exist in isolation, the reference formation energies are measured at 1 mol/kg of the salt. This is fine when there is a single reaction (2 H2O<-> H3O+ + OH-) since that would just be the H2O 'salt'. However, if you have a weak acid, and thus two reactions (HA + H2O <-> H3O+ + A-), there are three ions, H3O+, A- and OH-. What's the reference system in this case? My feeling is I'll treat the reference as reaction-dependent. So the reference will change for each reaction, but at least the way the reference is treated will be consistent. |
Maybe we could differentiate references by parameter name? ( |
So at the moment I'm differentiating them by the model type (ReactiveModel vs ReactiveAqModel). I think since the way the equations are solved and the concentration scales involved are different, it's best to keep it that way. However, I seem to have failed at defining the struct types since, ideally, ReactiveAqModel <: ReactiveModel, but I couldn't get it to work. Any advice @longemen3000? |
i was just looking at the code, and the main difference between the aqueous and normal reactive model are the value of |
Started doing some work on trying to model reactive systems. Right now it will only work in a bulk system.
As an example: